package com.shixw_usr.MultiThreadedDownload.manager;

import com.shixw_usr.MultiThreadedDownload.entity.DownloadInfo;
import com.shixw_usr.MultiThreadedDownload.entity.DownloadMessage;
import com.shixw_usr.MultiThreadedDownload.logging.FixedLoggers;

public class BaseDownloadMessageListener implements DownloadMessageListener,FixedLoggers{

	@Override
	public synchronized void handleMessage(DownloadMessage message) {
		MTDLOGGER.info(message.getMessageDescription());
	}

	@Override
	public void handleMessage(String messageStatus, DownloadInfo downloadInfo) {
		handleMessage(new DownloadMessage(messageStatus, downloadInfo));
	}

	@Override
	public void handleMessage(String messageStatus, String messageDescription,
			DownloadInfo downloadInfo) {
		handleMessage(new DownloadMessage(messageStatus, messageDescription,downloadInfo));
	}

}
